package  
{
	/**
	 * ...
	 * @author Paul Forest
	 */
	public class Match 
	{
		public var person1:Person, person2:Person;
		public var station:Station;
		public var round:int;
		public var score:int = 0;
		
		public function Match(person1:Person, person2:Person, station:Station, round:int, score:int) 
		{
			this.person1 = person1;
			this.person2 = person2;
			this.station = station;
			this.round = round;
			this.score = score;
			
			//trace("Match(): " + this);
		}
		
		public static function sortOnScore(first:Match, second:Match):Number {
			if (first.score > second.score) return -1;
			if (first.score < second.score) return 1;
			return 0;
		}
		
		public function toString():String {
			return "Match:"
				+ " score=" + score
				+ " round=" + round
				+ " person1=" + person1
				+ " person2=" + person2
				+ " station=" + station
				;
		}
		
	}

}